home *** CD-ROM | disk | FTP | other *** search
- Path: news.mty.itesm.mx!news
- From: Orlando Karam
- Newsgroups: comp.lang.c
- Subject: Re: *** NEED ADVICE : Shell out to DOS ***
- Date: Fri, 08 Mar 1996 19:24:36 GMT
- Organization: ITESM Campus Monterrey . DINF-DTCI
- Message-ID: <4hq1oo$2m6@news.mty.itesm.mx>
- References: <4hh220$bsv@fountain.mindlink.net>
- NNTP-Posting-Host: csline5.cieamer.conacyt.mx
- X-Newsreader: Forte Free Agent 1.0.82
-
- mike_huwe@mindlink.bc.ca (Mike Huwe) wrote:
-
- >I have a menu program. When the user selects option 1, the program should
- >shell out to dos and display the current version and then return back to
- >the menu.
-
- >The code I used is: case '1':
- > system("ver");
- > break;
-
- >This did not work. Is there more code that I must add or is it a different
- >command entirely? Thanks in advance.
-
-
- >Mike
-
-
- I think the problem is that VER is an internal command, so it can be
- 'executed' with system, you have to execute a copy of command.com, and
- then do it execute the command VER.
-
- If you want to do it with a shell command, it should work :
- system("command /c ver")
-
- (the /c parameter to command.com is for executing the command and then
- exit.)
-
- There is also an interrupt service that gives you the version number,
- i don┤t have the reference now, but i believe that is a service of int
- 21h, so you can look on a list of interrupts and services.
-
- Orlando.
-
- P.D. Sprry for the english, i am mexican.
-
-